Python Task 1

Task 1 - Create An ATM Machine Simulation

Image

Create a console-based ATM application that simulates basic ATM operations like checking balance, depositing, and withdrawing money.

Instructions:

  • PIN Validation:
    • Start by asking the user to enter their 4-digit PIN.
    • Allow the user 3 attempts to enter the correct PIN before denying access.
  • ATM Menu:
    • Once the PIN is correctly entered, display the following options:
      • Check Balance
      • Deposit Money
      • Withdraw Money
      • Exit
  • Implement the following functionalities:
    • Check Balance: Display the current balance.
    • Deposit: Allow the user to deposit an amount, ensuring it is positive.
    • Withdraw: Allow the user to withdraw an amount, ensuring the withdrawal does not exceed the current balance.
    • Exit: End the session with a goodbye message.
  • Error Handling:
    • SIf the user enters an invalid option or tries to withdraw more than their balance, display appropriate error messages.
  • Initial Setup:
    • Set an initial balance of $1000 and a PIN of "1234" for testing.

Sample Features:

  • PIN validation with a maximum of 3 attempts.
  • Balance check with correct formatting for currency.
  • Deposit and withdraw features with proper input validation.
  • Clear and informative user messages.

Bonus Task (Optional):

  • Add an option to reset the PIN after the user successfully logs in.

Deliverables:

  • Submit the completed Python script.
  • Ensure the program runs without errors and handles all possible user inputs.

  • Use Python for your implementation.
  • Ensure your code is well-documented with comments explaining the functionality of each part.

  • We will be sharing a Google Form shortly to collect your code files.
  • Submit your code file through the provided Google Form link.
  • After submission, we will verify your task.

Social Medias

Loading...